//========================================================================================
//  
//  $File: //depot/indesign_7.x/highprofile/source/sdksamples/basicdialog/BscDlg.fr $
//  
//  Owner: Adobe Developer Technologies
//  
//  $Author: alokumar $
//  
//  $DateTime: 2011/04/01 11:22:15 $
//  
//  $Revision: #1 $
//  
//  $Change: 781912 $
//  
//  Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
//  
//  NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance 
//  with the terms of the Adobe license agreement accompanying it.  If you have received
//  this file from a source other than Adobe, then your use, modification, or 
//  distribution of it requires the prior written permission of Adobe.
//  
//  
//  Umbrella include file for all the .fr files in the plug-in.
//  
//========================================================================================

//===========================
//  General includes:
//===========================

#include "MenuDef.fh"
#include "ActionDef.fh"
#include "ActionDefs.h"
#include "AdobeMenuPositions.h"
#include "LocaleIndex.h"
#include "PMLocaleIds.h"
#include "StringTable.fh"
#include "objectmodeltypes.fh"
#include "ShuksanID.h"
#include "ActionID.h"
#include "CommandID.h"
#include "WorkspaceID.h"
#include "widgetid.h"
#include "BuildNumber.h"
#include "IControlViewDefs.h"
#include "SysControlIds.h"
#include "Widgets.fh" // for DialogBoss
#include "IconStyleDefs.h" // for icon widget resource PNGIconAttributes
#include "InterfaceColorDefines.h"		//<--20120422
#include "PlugInModel_UIAttributes.h"
#include "TreeViewDefs.h"
// Project includes:
#include "BscDlgID.h"
#include "SDKSharedPNG.fr"

#ifdef __ODFRC__

/*
// Plugin version definition.
*/
resource PluginVersion (kSDKDefPluginVersionResourceID)
{
	kTargetVersion,
	kBscDlgPluginID,
	kSDKDefPlugInMajorVersionNumber, kSDKDefPlugInMinorVersionNumber, 	
	kSDKDefHostMajorVersionNumber, kSDKDefHostMinorVersionNumber,
	kBscDlgCurrentMajorFormatNumber, kBscDlgCurrentMinorFormatNumber,
	{ kInDesignProduct, kInCopyProduct },
	{ kWildFS },
	kUIPlugIn,
	kBscDlgVersion
};

/*
//	Boss class definition.
*/
resource ClassDescriptionTable(kSDKDefClassDescriptionTableResourceID)
{{{
	/**
		Provides the behaviour for the dialog for this plug-in. All
		 dialogs must implement IDialogController. Specialisation of 
		 IObserver is only necessary if you want to handle widget 
		 changes dynamically rather than just gathering their values 
		 and applying in the IDialogController implementation.
		 In this implementation IObserver is specialised so that the 
		 plug-in's about box is popped when the info button widget 
		 is clicked.
	 
	 @ingroup basicdialog
	*/
	Class
	{
		kBscDlgDialogBoss,
		kDialogBoss,
		{
			/** Provides management and control over the dialog. Implementation of IDialogController.
				@see BscDlgDialogController 
			*/
			IID_IDIALOGCONTROLLER, kBscDlgDialogControllerImpl,
			/** Allows dynamic processing of dialog changes. Implementation of IObserver.
				@see BscDlgDialogObserver
			*/
			IID_IOBSERVER, kBscDlgDialogObserverImpl,
		}
	},
	
	Class		//<--20120421
	{
		kBscSlDlgLoginDialogBoss,
		kDialogBoss,
		{
			IID_IOBSERVER, kBscDlgLoginDialogObserverImpl,	//<--20120421
			//IID_IDIALOGCREATOR, kBscSlDlgLoginDialogCreatorImpl,
		}
	},
	
	Class		//<--20120423
	{
		kBscSlDlgIssuesDialogBoss,
		kDialogBoss,
		{
			IID_IOBSERVER, kBscDlgIssuesDialogObserverImpl,	//<--20120423
			//IID_IDIALOGCREATOR, kBscSlDlgLoginDialogCreatorImpl,
		}
	},
	
	/**
		Text Widget boss.
	*/
	Class		//<--20120423
	{
		kWLBCmpTextWidgetBoss,
		kInfoStaticTextWidgetBoss,
		{
			// Add the following interfaces for a white background (they'd override the default.)
			// IID_ICONTROLVIEW, kAboutBoxStaticTextViewImpl,
			// IID_IBOOLDATA, kPersistBoolDataImpl,
		}
	}		//<--20120423
	
	/**
		Gives a list-box (tree view) that has additional observer added... 
		to get selection change notifications
		@ingroup wlistboxcomposite
	*/
	Class		//<--20120423
	{
		kWLBCmpListBoxWidgetBoss,
		kTreeViewWidgetBoss,
		{
			/** Furnishes application framework with widgets as needed */
			IID_ITREEVIEWWIDGETMGR,  kWLBCmpTVWidgetMgrImpl,
			/** Adapts our data model to the needs of the application framework */
			IID_ITREEVIEWHIERARCHYADAPTER,  kWLBCmpTVHierarchyAdapterImpl,
			/** Hold names of the list item */
            IID_ISTRINGLISTDATA,        kStringListDataImpl, 
            /** Display selection message */   
  			IID_IOBSERVER,	kWLBCmpListBoxObserverImpl,
		}
	},			//<--20120423
	
	/**
	Provides the actions invoked by this plug-in's
	 sub-menu items. It supports two interfaces: 
	 IActionComponent and IPMPersist. We provide the implementation 
	 for IActionComponent (see BscDlgActionComponent). The other
	 default implementation is provided by the API.
	 
	 @ingroup basicdialog
	*/
	Class
	{
		kBscDlgActionComponentBoss,
		kBaseActionComponentBoss,
		{
			/** Handle the actions from the menu. 
				@see BscDlgActionComponent
			*/
			IID_IACTIONCOMPONENT, kBscDlgActionComponentImpl,
		}
	}
}}};

/*
// Implementation definition.
*/
resource FactoryList (kSDKDefFactoryListResourceID) 
{
	kImplementationIDSpace,
	{
#include "BscDlgFactoryList.h"
	}
};

/*
// Menu definition.
*/
resource MenuDef (kSDKDefMenuResourceID)
{
	{
		// The About Plug-ins sub-menu item for this plug-in.
		kBscDlgAboutActionID,			// ActionID (kInvalidActionID for positional entries)
		kBscDlgAboutMenuPath,			// Menu Path.
		kSDKDefAlphabeticPosition,			// Menu Position.
		kSDKDefIsNotDynamicMenuFlag,		// kSDKDefIsNotDynamicMenuFlag or kSDKDefIsDynamicMenuFlag.

		// The Plug-ins menu sub-menu items for this plug-in.
		kBscDlgDialogActionID,
		kBscDlgPluginsMenuPath,
		kBscDlgDialogMenuItemPosition,
		kSDKDefIsNotDynamicMenuFlag,
		
		// The Plug-ins menu sub-menu items for this plug-in.
		kBscDlgLoginDialogActionID,			//<--20120421
		kBscDlgPluginsMenuPath,
		kBscDlgLoginDialogMenuItemPosition,	//<--20120421
		kSDKDefIsNotDynamicMenuFlag,
		
		// The Plug-ins menu sub-menu items for this plug-in.
		kBscPnlTrvPanelActionID,			//<--20120422
		kBscDlgPluginsMenuPath,
		kBscPnlTrvPanelMenuItemPosition,	//<--20120422
		kSDKDefIsNotDynamicMenuFlag,
		
		// The Plug-ins menu sub-menu items for this plug-in.
		kBscDlgIssuesDialogActionID,			//<--20120423
		kBscDlgPluginsMenuPath,
		kBscDlgIssuesDialogMenuItemPosition,	//<--20120423
		kSDKDefIsNotDynamicMenuFlag,

	}
};

/*
// Action definition.
*/
resource ActionDef (kSDKDefActionResourceID)
{
	{ 
		kBscDlgActionComponentBoss, 		// ClassID of boss class that implements the ActionID.
		kBscDlgAboutActionID,	// ActionID.
		kBscDlgAboutMenuKey,	// Sub-menu string.
		kHelpMenuActionArea,				// Area name (see ActionDefs.h).
		kNormalAction,					// Type of action (see ActionDefs.h).
		kDisableIfLowMem,				// Enabling type (see ActionDefs.h).
		kInvalidInterfaceID,			// Selection InterfaceID this action cares about or kInvalidInterfaceID.
		kSDKDefInvisibleInKBSCEditorFlag, // kSDKDefVisibleInKBSCEditorFlag or kSDKDefInvisibleInKBSCEditorFlag.

		kBscDlgActionComponentBoss,
		kBscDlgDialogActionID,		
		kBscDlgDialogMenuItemKey,		
		kOtherActionArea,			
		kNormalAction,				
		kDisableIfLowMem,	
		kInvalidInterfaceID,		
		kSDKDefInvisibleInKBSCEditorFlag,
		
		kBscDlgActionComponentBoss,			//<--20120421
		kBscDlgLoginDialogActionID,			//<--20120421	
		kBscSlDlgLoginDialogMenuItemKey,	//<--20120421	
		kOtherActionArea,			
		kNormalAction,				
		kDisableIfLowMem,	
		kInvalidInterfaceID,		
		kSDKDefInvisibleInKBSCEditorFlag,
		
		kBscDlgActionComponentBoss,			//<--20120422
		kBscPnlTrvPanelActionID,			//<--20120422
		kBscPnlTrvPanelMenuItemKey,			//<--20120422
		kOtherActionArea,			
		kNormalAction,				
		kDisableIfLowMem,	
		kInvalidInterfaceID,		
		kSDKDefInvisibleInKBSCEditorFlag,
		
		kBscDlgActionComponentBoss,			//<--20120423
		kBscDlgIssuesDialogActionID,		//<--20120423	
		kBscSlDlgIssuesDialogMenuItemKey,	//<--20120423	
		kOtherActionArea,			
		kNormalAction,				
		kDisableIfLowMem,	
		kInvalidInterfaceID,		
		kSDKDefInvisibleInKBSCEditorFlag,
	}
};


/*
// LocaleIndex Definition.
// The LocaleIndex should have indicies that point at your
// localizations for each language system that you are 
// localized for.
*/
/*
// String LocaleIndex.
*/
resource LocaleIndex (kSDKDefStringsResourceID)
{
	kStringTableRsrcType,
	{
		kWildFS, k_enUS, kSDKDefStringsResourceID + index_enUS
		kWildFS, k_jaJP, kSDKDefStringsResourceID + index_jaJP
		
		kWildFS, k_Wild, kSDKDefStringsResourceID + index_enUS
	}
};

resource LocaleIndex (kSDKDefStringsNoTransResourceID)
{
	kStringTableRsrcType,
	{
		kWildFS, k_Wild, kSDKDefStringsNoTransResourceID + index_enUS
	}
};

resource StringTable (kSDKDefStringsNoTransResourceID + index_enUS)
{
	k_enUS,									// Locale Id
	kEuropeanMacToWinEncodingConverter,		// Character encoding converter
	{
		// No-Translate strings go here:		


	}
};

// added to support the list elements in the list box
resource LocaleIndex (kWLBCmpListElementRsrcID)				//<--20120423
{
	kViewRsrcType,
	{
		kWildFS, k_Wild, kWLBCmpListElementRsrcID + index_enUS		//<--20120423
	}
};

/*
// Dialog LocaleIndex.
*/
resource LocaleIndex (kSDKDefDialogResourceID)
{
   kViewRsrcType,
	{
		kWildFS,	k_Wild, kSDKDefDialogResourceID + index_enUS
	}
};

/*
// Panel LocaleIndex.
*/
resource LocaleIndex (kSDKDefPanelResourceID)		//<--20120422
{
	kViewRsrcType,
	{
		kWildFS, k_Wild, kSDKDefPanelResourceID + index_enUS	//<--20120422
	}
};

/*
// Dialog LocaleIndex.	
*/
resource LocaleIndex (kBscSlDlgLoginDialogResourceID)	//<--20120421
{
   kViewRsrcType,
	{
		kWildFS,	k_Wild, kBscSlDlgLoginDialogResourceID	//<--20120421
	}
};

/*
// Dialog LocaleIndex.	
*/
resource LocaleIndex (kBscSlDlgIssuesDialogResourceID)	//<--20120423
{
   kViewRsrcType,
	{
		kWildFS,	k_Wild, kBscSlDlgIssuesDialogResourceID	//<--20120423
	}
};

/*
// Type definition. Note the exotic naming 'DialogBoss' for what is really a widget.
*/
type BscDlgDialogBoss(kViewRsrcType) : DialogBoss(ClassID = kBscDlgDialogBoss)
{
};
type BscSlDlgLoginDialogWidget(kViewRsrcType) : DialogBoss(ClassID = kBscSlDlgLoginDialogBoss) { };	//<--20120421
type BscSlDlgIssuesDialogWidget(kViewRsrcType) : DialogBoss(ClassID = kBscSlDlgIssuesDialogBoss) { };	//<--20120423
type PnlTrvPanelWidget(kViewRsrcType) : PalettePanelWidget(ClassID = kPnlTrvPanelWidgetBoss)	//<--20120422
{
	CPanelMenuData;	//<--20120422
};

type WLBCmpListBox	(kViewRsrcType) : TreeViewWidget	(ClassID = kWLBCmpListBoxWidgetBoss) { };	//<--20120423

type WLBCmpNodeWidget(kViewRsrcType) : PrimaryResourcePanelWidget(ClassID = kTreeNodeWidgetBoss)	//<--20120423
{
};
type WLBCmpTextWidget	(kViewRsrcType) : InfoStaticTextWidget	(ClassID = kWLBCmpTextWidgetBoss) { };	//<--20120423

/*
// Dialog definition.
// This view is not localised: therefore, it can reside here.
// However, if you wish to localise it, it is recommended to locate it in one of
// the localised framework resource files (i.e. BscDlg_enUS.fr etc.) and
// update your Dialog LocaleIndex accordingly.
*/
resource BscDlgDialogBoss (kSDKDefDialogResourceID + index_enUS) 
{ 
	__FILE__, 
	__LINE__, 
	kBscDlgDialogWidgetID, // WidgetID
	kPMRsrcID_None, // RsrcID
	kBindNone, // Binding
	Frame(0,0,388,112) // Frame (l,t,r,b)
	kTrue, 
	kTrue, // Visible, Enabled
	kBscDlgDialogTitleKey, // Dialog name
	{
		DefaultButtonWidget 
		( 
			kOKButtonWidgetID, // WidgetID
			kSysButtonPMRsrcId, // RsrcID
			kBindNone, // Binding
			Frame(292,16,372,36) // Frame (l,t,r,b)
			kTrue, 
			kTrue, // Visible, Enabled
			kSDKDefOKButtonApplicationKey,  // Button text
		),
		CancelButtonWidget 
		( 
			kCancelButton_WidgetID, // WidgetID
			kSysButtonPMRsrcId, // RsrcID
			kBindNone, // Binding
			Frame(292,46,372,66) // Frame (l,t,r,b)
			kTrue, 
			kTrue, // Visible, Enabled
			kSDKDefCancelButtonApplicationKey, // Button name
			kTrue,  // Change to Reset on option-click.
		),
		RollOverIconButtonWidget 
		( 
			kBscDlgIconSuiteWidgetID, // WidgetID
			kSDKDefIconInfoResourceID, // Icon resource ID
			kBscDlgPluginID, // Plug-in ID
			kBindNone, // Binding
			Frame(5,87,26,107) // Frame (l,t,r,b)
			kTrue, 
			kTrue, // Visible, Enabled
			kADBEIconSuiteButtonDrawWellType,  // PNGIconAttributes, new for InDesign 3.0
		),
	} 
};

//<--20120421
resource BscSlDlgLoginDialogWidget (kBscSlDlgLoginDialogResourceID) 
{ 
	__FILE__, 
	__LINE__, 
	kBscSlDlgLoginDialogWidgetID, // WidgetID
	kPMRsrcID_None, // RsrcID
	kBindNone, // Binding
	Frame(0,0,440,275) // Frame (l,t,r,b)
	kTrue, 
	kTrue, // Visible, Enabled
	kBscSlDlgLoginDialogTitleKey, // Dialog name
	{
		ButtonWidget 
		( 
			kOKButtonWidgetID, // The Identifier for this Widget
			kSysButtonPMRsrcId, // The Plugin ID
			kBindNone, // Frame binding
			Frame(294,229,374,249) 
			kTrue, // Is this visible
			kTrue, // Is this enabled
			kSDKDefOKButtonApplicationKey,  // The String value
		),
	} 
};	//<--20120421


//<--20120423
resource BscSlDlgIssuesDialogWidget (kBscSlDlgIssuesDialogResourceID) 
{ 
	__FILE__, 
	__LINE__, 
	kBscSlDlgIssuesDialogWidgetID, // WidgetID
	kPMRsrcID_None, // RsrcID
	kBindNone, // Binding
	Frame(0,0,440,275) // Frame (l,t,r,b)
	kTrue, 
	kTrue, // Visible, Enabled
	kBscSlDlgIssuesDialogTitleKey, // Dialog name
	{
		ButtonWidget 
		( 
			kOKButtonWidgetID, // The Identifier for this Widget
			kSysButtonPMRsrcId, // The Plugin ID
			kBindNone, // Frame binding
			Frame(349,244,429,264) 
			kTrue, // Is this visible
			kTrue, // Is this enabled
			kSDKDefOKButtonApplicationKey,  // The String value
		),
		WLBCmpListBox//TreeViewWidget 
		( 
			kWLBCmpListBoxWidgetID, // The Identifier for this Widget
			kPMRsrcID_None, // The Plugin ID
			kBindAll, // Frame binding
			Frame(9,4,225,260) 
			kTrue, // Is this visible
			kTrue, // Is this enabled
			kTrue, // Erase Before Draw
			kInterfacePaletteFill, // InterfaceColor to erase to
			"", // The String value
			kTrue, // Display Root Node
			kFalse, // Use Horizontal Scrollbar
			kTrue, // Use Vertical Scrollbar
			20, // Vertical Scroll Button Increment
			20, // Vertical Thumb Scroll Increment
			20, // Horizontal Scroll Button Increment
			20, // Horizontal Thumn Scroll Increment
			1, // Items selectable, 0=No Selection, 1=Single Selection, 2=Multiple Selection
			kTrue, // Allow children from multiple parents to be selected
			kTrue, 
			{
			} 
		),
	} 
};	//<--20120423

resource WLBCmpNodeWidget (kWLBCmpListElementRsrcID + index_enUS)		//<--20120423
{
	__FILE__, __LINE__,
	kWLBCmpListParentWidgetId, kPMRsrcID_None,	// WidgetId, RsrcId
	kBindLeft | kBindRight,			// Frame binding
	Frame(0, 0, 194, 20),			// Frame
	kTrue, kTrue,					// Visible, Enabled
	"",								// Panel name
	{
	/*
		WLBCmpEyeballWidget
		(
			kWLBCmpListElementEyeballWidgetID, kWLBCmpEyeBallIcon, kWLBCmpPluginID, // WidgetId, RsrcId
			kBindLeft,											// Frame binding
			Frame(3,1,22,18)									// Frame
			kTrue, kTrue,										// Visible, Enabled
			kADBEIconSuiteButtonType,
		),
		WLBCmpPenWidget
		(
			kWLBCmpListElementPenWidgetID, kWLBCmpPenIcon, kWLBCmpPluginID, // WidgetId, RsrcId
			kBindLeft,											// Frame binding
			Frame(25,1,44,18)									// Frame
			kTrue, kTrue,										// Visible, Enabled
			kADBEIconSuiteButtonType,
		),
	*/
		// Just a info-static text widget with about-box text view to get white bg.
		WLBCmpTextWidget
		(
			kWLBCmpTextWidgetID, kPMRsrcID_None,		// WidgetId, RsrcId
			kBindLeft | kBindRight,								// Frame binding
			Frame(45,1,194,18)									// Frame
			kTrue, kTrue, kAlignLeft,kEllipsizeEnd,kTrue,		// Visible, Enabled, ellipsize style, convert ampersands
			"",													// Initial text
			0,													// Associated widget for focus
			kPaletteWindowSystemScriptFontId,					// default font 
			kPaletteWindowSystemScriptHiliteFontId,				// for highlight state.
		),
		
	}
};			//<--20120423

resource PnlTrvPanelWidget (kSDKDefPanelResourceID + index_enUS) //<--20120422
{ 
	__FILE__, 
	__LINE__, // Localization macro
	kPnlTrvPanelWidgetID, // WidgetID
	kPMRsrcID_None, // RsrcID
	kBindNone, // Binding (0=none)
	Frame(0,0,207,372) // Frame: left, top, right, bottom.
	kTrue, 
	kTrue, // Visible, Enabled
	kFalse, // Erase background
	kInterfacePaletteFill, // Erase to color
	kFalse, // Draw dropshadow
	kPnlTrvPanelTitleKey, // Panel name
	{
		DefaultButtonWidget 
		( 
			kOKButtonWidgetID, // WidgetID
			kSysButtonPMRsrcId, // RsrcID
			kBindNone, // Binding
			Frame(119,24,199,44) // Frame (l,t,r,b)
			kTrue, 
			kTrue, // Visible, Enabled
			kSDKDefOKButtonApplicationKey,  // Button text
		),
	}
	kPnlTrvInternalPopupMenuNameKey,  // Popup menu name (internal)
}; //<--20120422

#endif // __ODFRC__

#include "BscDlg_enUS.fr"
#include "BscDlg_jaJP.fr"

// End, BscDlg.fr.